home *** CD-ROM | disk | FTP | other *** search
/ EDUCORP 8 / Educorp2Compilation.sit / educorp2 / Programming (2300, 7000) / 7008 Prog’s Notebk / Programmers notebook update / card_2936.txt < prev    next >
Encoding:
Text File  |  1991-04-24  |  1.9 KB  |  89 lines

  1. -- card: 2936 from stack: in
  2. -- bmap block id: 3220
  3. -- flags: 0000
  4. -- background id: 2738
  5. -- name: 
  6.  
  7.  
  8. -- part 1 (button)
  9. -- low flags: 00
  10. -- high flags: 8003
  11. -- rect: left=77 top=75 right=96 bottom=179
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Re-Index
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   --this is the new button
  23.   global a,b,x,y
  24.   play boing c5
  25.   put "Sorting Reference Cards . . . Please Wait" into message
  26.   put empty into card field 1
  27.   put empty into card field 2
  28.   set the cursor to 4
  29.   sort text by field 2
  30.   play boing d4
  31.   put "Getting Keywords . . . Please Wait" into message
  32.   put the number of cards into x
  33.   put the number of cards into y
  34.   divide x by 2
  35.   put trunc(x) into a
  36.   subtract a from y
  37.   repeat for a
  38.     go next
  39.     get field 2
  40.     put it & return into last line of card field 1 of card 1
  41.   end repeat
  42.   repeat for y
  43.     go next
  44.     get field 2
  45.     put it & return into last line of card field 2 of card 1
  46.   end repeat
  47.   go card 1
  48.   put "Compacting Stack . . . Please Wait" into message
  49.   doMenu "Compact Stack"
  50.   put "Done" into message
  51.   wait 2 seconds
  52.   hide message
  53. end mouseUp
  54.  
  55.  
  56.  
  57.  
  58. -- part 2 (button)
  59. -- low flags: 00
  60. -- high flags: 8003
  61. -- rect: left=76 top=48 right=69 bottom=178
  62. -- title width / last selected line: 0
  63. -- icon id / first selected line: 0 / 0
  64. -- text alignment: 1
  65. -- font id: 0
  66. -- text size: 12
  67. -- style flags: 0
  68. -- line height: 16
  69. -- part name: Update
  70. ----- HyperTalk script -----
  71. on mouseUp
  72.   choose button tool
  73.   get the loc of card button 1
  74.   click at it
  75.   doMenu "Copy Button"
  76.   go card 1 of "Programmer's Notebook"
  77.   get the loc of card button "Re-Index"
  78.   click at it
  79.   doMenu "Clear Button"
  80.   doMenu "Paste Button"
  81.   choose browse tool
  82.   show msg
  83.   put "There ya go‚Ķ" into msg
  84.   wait 2 seconds
  85.   hide msg
  86. end mouseUp
  87.  
  88.  
  89.